<template>
  <ComWrapper>
    <el-card shadow="never" header="v-auth 高精度权限控制">
			<el-button v-auth="'role:info:add'" type="primary">v-auth="'role:info:add'"</el-button>
			<el-button v-auth="['menu:info:add','menu:info:del']" type="primary">v-auth="['menu:info:add','menu:info:del']"</el-button>
			<el-alert title="v-auth指令 是$AUTH的语法糖, 原先需要使用v-if来判断是否有权限, 使用指令将减少代码冗余. 并且支持传入数组,有一项满足就判断有权限" style="margin-top: 20px;" />
    </el-card>

    <el-card shadow="never" header="v-copy 一键复制" style="margin-top: 15px;">
			<el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="copyText" />
			<el-button v-copy="copyText" type="primary" style="margin-top: 15px;">复制</el-button>
			<el-alert title="点击复制按钮会将文本框绑定的值复制到剪切板, 试着粘贴到其他地方看看效果" style="margin-top: 20px;" />
		</el-card>
		<ComEmpty />
  </ComWrapper>
</template>

<script setup>
import {ref} from 'vue'

const copyText = ref('测试复制内容')
</script>
